export default {
  data: function () {
    return {
      status: 'wait',
      initdbPath: ''
    }
  },
  computed: {
    title: function () {
      var title
      switch (this.status) {
        case 'load':
          title = 'Loading...'
          break
        case 'ready':
          title = 'Ready'
          break
        case 'init':
          title = 'Initializing...'
          break
        default:
          title = 'Waiting...'
      }
      return title
    }
  },
  methods: {
    setStatus (status) {
      this.status = status
    },
    reload () {
      return this.$db.tryReload(this.setStatus)
    }
  }
}
